home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1986 February / 1986-02.d64 / demo 2 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  1KB  |  35 lines

  1. 99 ifa=0thena=1:load"blinkobj",8,1
  2. 100 rem poke56,28:poke55,0:clr for vic, poke56,60:poke55,0:clr for +4/16
  3. 110 nu=15:rem nu=7 for vic
  4. 120 v1=785:v2=786:co=646:hi=192:rem for +4/16, v1=1281:v2=1282:co=1339:hi=60
  5. 130 rem for vic v1=1:v2=2:co=646:hi=28
  6. 140 pokev1,0:pokev2,hi
  7. 150 rem ** change these values to change the blink colors
  8. 160 dimct(nu)
  9. 170 fori=0tonu:ct(i)=nu-i:next
  10. 180 rem ** usr() is at $c000 for 64, $3c00 for +4/16, $1c00 for vic **
  11. 190 sd=16384: rem ** set delay flag
  12. 200 db=8192 : rem ** disable blink
  13. 210 eb=4096 : rem ** enable blink
  14. 220 sb=2048 : rem ** stop color from blinking
  15. 230 mb=1024 : rem ** make color start blinkg
  16. 240 vb=512  : rem ** return value of blinking color
  17. 250 rc=256  : rem ** reset all colors-nno blinking
  18. 260 rem *** now we demonstrate blink
  19. 270 x=usr(db): rem ** must disable blinkmode first
  20. 280 print"[147]"
  21. 290 poke53280,0:poke53281,0:rem make background black
  22. 300 rem for +4/16 - color 0,1,7:color 4,1,7 in line 290
  23. 310 rem for vic - poke36879,8 in line 290
  24. 320 for l=0 to nu: rem ** set all the colors
  25. 330 cl=ct(l)
  26. 340 x=usr(mb+(cl*16)+l): rem ** set the color to blink to
  27. 350 pokeco,l:rem ** change current color to x
  28. 360 print"blinking from"l"to"cl
  29. 370 next l
  30. 380 x=usr(sd+60): rem * set blink for 1 second
  31. 390 print:print"hit a key to start"
  32. 400 geta$:ifa$="" then400
  33. 410 x=usr(eb)
  34. 420 end
  35.